<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title></title> 

<style>
/**

grid-column-gap 属性来设置列之间的网格间距
grid-row-gap 属性来设置行之间的网格间距
grid-gap 属性是 grid-row-gap 和 the grid-column-gap 属性的简写
*/


.grid-container {
	/*display: inline-grid;*/
	display: grid;
	/**
	grid-template-columns: auto auto auto auto;
	*/
	grid-template-columns: 2fr 1fr 2fr 1fr;
	grid-template-rows: 100px 300px;
	grid-gap: 10px;
	background-color: #2196F3;
}

.grid-container > div {
  background-color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 20px 0;
  font-size: 30px;
}



</style>
</head>
<body>

<div class="grid-container">
	<div class="grid-item">1</div>
	<div class="grid-item">2</div>
	<div class="grid-item">3</div>
	<div class="grid-item">4</div>
	<div class="grid-item">5</div>
	<div class="grid-item">6</div>
	<div class="grid-item">7</div>
	<div class="grid-item">8</div>
</div>

</body>
</html>